package com.base.application;

import android.app.Application;
import android.content.Context;

import com.face.gaoml.netlibrary.App;
import com.face.gaoml.netlibrary.module.AppModule;

import net.ApiModuleImpl;
import net.MyApiService;


/**
 * Created by gml on 17/1/6.
 */

public class AppApplication extends App {

    private AppComponent appComponent;



    public static AppApplication get(Context context){

        return (AppApplication)context.getApplicationContext();
    }

    @Override
    public void onCreate() {
        super.onCreate();
        appApplication =this;
        appComponent=DaggerAppComponent.builder()
                .appModule(new AppModule(this))
                .apiModuleImpl(new ApiModuleImpl())
                .build();
    }




    public AppComponent getAppComponent() {
        return appComponent;
    }



}
